package com.noahplat.user.mapper;

import com.noahplat.user.pojo.Version;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * 版本更新
 *
 * @author 李东
 * @version 1.0.0
 * @Date: 2021/5/8 8:54
 **/
public interface VersionMapper extends Mapper<Version> {
    @Select("select v.id,v.name,v.version,v.is_hot as isHot,v.stid,s.sys_name as sysname from tb_version v left join sys_type s on s.id = v.stid")
    public List<Version> getVersion();

    @Select("select v.id,v.name,v.version,v.is_hot as isHot,v.stid,s.sys_name as sysname from tb_version v left join sys_type s on s.id = v.stid where v.stid=#{stid}")
    public List<Version> getVersionByStid(@Param("stid")Long stid);
}
